<!--
        Git@OSC Repository-Widget  v0.4

          (C)2016  shiy2008@gmail.com
-->
<style>
    .osc_git_box {
        background:      #fafafa;
        border-color:    #ddd;
    }
    .osc_git_box .mini-icon, .osc_git_box .row_container {
        padding:    0.25em  !important;
    }
    .osc_git_title, .osc_git_footer,
    .osc_git_info, .osc_git_issues, .osc_git_commits {
        padding:       1em  !important;
        text-align:    left  !important;
    }
    .osc_git_main a, .pro_name a {
        color:    #4183c4;
    }
    @media (max-width:  640px) {
        .row_left a {
            display:          inline-block;
            width:            auto  !important;
            text-overflow:    ellipsis;
        }
        .osc_git_issues .row_left a {
            max-width:    90%;
        }
        .osc_git_commits .row_left a {
            max-width:    70%;
        }
    }
</style>
<script>
    function Add_Event(iType, iHandler) {
        iType = iType.split(/\s+/);

        for (var i = 0;  iType[i];  i++)
            if (this.addEventListener)
                this.addEventListener(iType[i], iHandler, false);
            else
                this.attachEvent('on' + iType[i],  iHandler);
    }

    var iParameter = self.location.search.slice(1);

    var iName = iParameter.match(/&?repository=([^&]+)/),
        iHidden = iParameter.match(/&?hidden=([^&]+)/);

    if ((iHidden || '')[1])
        Add_Event.call(self,  'load',  function () {
            iHidden = iHidden[1].split(',');

            for (var i = 0;  iHidden[i];  i++)
                document.querySelector('.osc_git_' + iHidden[i] + 's')
                    .style.display = 'none';
        });

    try {
        self.parent.name || self.frameElement.id;

        Add_Event.call(self, 'load resize',  function Resize() {
            self.frameElement.height = Math.max(
                document.documentElement.offsetHeight,
                document.documentElement.scrollHeight
            );
        });
    } catch (iError) { }

    document.write(
        '<script src="//git.oschina.net/'  +
        (iName ? iName[1] : 'Tech_Query/Git-OSC_Repository-Widget')  +
        '/widget_preview"></script\>'
    );
</script>